
<template>
	<view class="home">

		<!-- <view class="header">
			<view  style="font-size: 14px;">总ICT:{{log_jf.z_bal}}</view>
			<view  style="font-size: 14px;">总支出:{{log_jf.z_expend}}</view>
		</view>
		
		<view class="tit_bt"><text>提现帐号</text></view>
		<view class="tit_bt"><text>提现金额</text></view>
		<view class="tit_bt"><text>提现时间</text></view>
		 -->


		<view class="jifen">
			<view class="jifen_t">
				<view class="tit_bt"><text>提现人</text></view>
				<view class="tit_bt"><text>提现金额</text></view>
				<view class="tit_bt"><text>时间</text></view>
			</view>

			<view class="jifen_t" v-for="item in log_list" :key="item.id">
				<view class="tit_sj"><text>{{item.nickname}}</text></view>
				<view class="tit_sj"><text>{{item.bal}}</text></view>
				<view class="tit_sj"><text>{{item.c_time}}</text></view>
			</view>

		</view>
		<view class="sj_down">

			<uni-pagination :current="current" :total="total" :show-icon="true" @change="change" />
			<view class="sj_down_middle">
				<text style="margin-top: 10px;font-size: 12px;">当前页：{{ current }}，数据总量：{{ total }}条，每页数据：{{pageSize}}</text>
				
			</view>
			
		
		</view>

	</view>
</template>

<script>
	import helper from '.../../common/helper.js';
	
	export default {

		data() {
			return {
				id: "",
				log_list: [],

				//这个是分页器
				current: 1,
				total:"",
				pageSize:"",

			}
		},
		onLoad(options) {
			this.id = options.id;
			this.finance_log();
			this.id = options.id

		},

		methods: {
			
			//分页器

			change(e) {
				this.current = e.current;
				this.finance_log();
			},
			//获取分页数据
			async finance_log() {
				const res = await this.$myRuquest({
					url: '/index/api/finance_log?id=' + this.id +"&page=" + this.current
				})
				
				this.log_list = res.data.data
				
				this.total = res.data.total

				this.pageSize = res.data.pageSize
			},



		}
	}
</script>

<style lang="scss">
	.home {
		padding: 20px 20px;

		.header {
			display: flex;


			height: 30px;

			.h_one {
			 width: 33%;
			}
		}

		.bnt {
			margin-top: 20px;
			display: flex;
		}

		.jifen {
			margin-top: 10px;
			background-color: #EDEDED;
			border-radius: 8px;

			.jifen_t {


				display: flex;

				.tit_bt {
					margin-top: 5px;
					text-align: center;
					background-color: #D8D8D8;

					width: 50%;
					font-size: 15px
				}

				.tit_sj {
					margin-top: 5px;
					text-align: center;

					width: 50%;
					font-size: 15px;
					margin-bottom: 5px;
				}

			}

		}
		
		.sj_down{
			margin-top: 20px;
		}
		
		.sj_down_middle{
			text-align: center;
		}

		//---这个是分页样式-----
		.example-body {
			/* #ifndef APP-NVUE */
			display: block;
			/* #endif */
		}

		.btn-view {
			/* #ifndef APP-NVUE */
			display: flex;
			flex-direction: column;
			/* #endif */
			padding: 15px;
			text-align: center;
			background-color: #fff;
			justify-content: center;
			align-items: center;
		}

		.btn-flex {
			display: flex;
			flex-direction: row;
			justify-content: center;
			align-items: center;
		}

		.button {
			margin: 20px;
			width: 150px;
			font-size: 14px;
			color: #333;
		}
	}
</style>
